#ifndef MODULES_MQTT_MQTTSERVICE_H_
#define MODULES_MQTT_MQTTSERVICE_H_
#include "../core/IBean.h"
#include <MQTT.h>

class  MQTTService : public IBean{
private :
	bool runLooFlag = false;
	std::atomic<bool> _mqttLock = ATOMIC_FLAG_INIT;
	std::mutex _mtxMQTTLock;
public:
 	void start();
 	void loop();
 	void startMQTT();
 	void close();
 	void prepare0();
 	void publishMessage(const String &topic,const  String &payload);
 };

#endif /* MODULES_MQTT_MQTTSERVICE_H_ */
